Bug 553133 – GtkFileChooser won't ask to mount a volume
authorMatthias Clasen <mclasen@redhat.com>
Fri, 26 Sep 2008 19:25:35 +0000 (19:25 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 26 Sep 2008 19:25:35 +0000 (19:25 +0000)
2008-09-26  Matthias Clasen  <mclasen@redhat.com>

        Bug 553133 – GtkFileChooser won't ask to mount a volume

        * gtk/gtkfilechooserdefault.c (shortcuts_activate_volume): Use
        a GtkMountOperation when mounting, so that we get a password
        dialog when required.

svn path=/trunk/; revision=21523

ChangeLog
gtk/gtkfilechooserdefault.c

index 6ee1c6c74f65809155b4c7a811504c81990d4a15..38d7ab8e7fe1cef9cd21aa760f06b23dda1ee93c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-09-26  Matthias Clasen  <mclasen@redhat.com>
+
+       Bug 553133 – GtkFileChooser won't ask to mount a volume
+
+       * gtk/gtkfilechooserdefault.c (shortcuts_activate_volume): Use
+       a GtkMountOperation when mounting, so that we get a password
+       dialog when required.  
+
 2008-09-26  Cody Russell  <bratsche@gnome.org>
 
        Bug 553917 – Typo in gdkwindow-win32.c
index ec884257491faf9e27e37528cbf8923f38b7f679..8881936dc2879d720840ea3b5c1d607ad6c3d8a9 100644 (file)
@@ -6542,7 +6542,7 @@ show_and_select_files (GtkFileChooserDefault *impl,
 
   impl->show_and_select_files_cancellable =
     _gtk_file_system_get_folder (impl->file_system, parent_file,
-                                "standard::is-hidden,standard::type,standard::name",
+                                "standard::is-hidden,standard::type,standard::name,standard::content-type",
                                 show_and_select_files_get_folder_cb, info);
 
   profile_end ("end", NULL);
@@ -10261,12 +10261,16 @@ shortcuts_activate_volume (GtkFileChooserDefault *impl,
 
   if (!_gtk_file_system_volume_is_mounted (volume))
     {
-      set_busy_cursor (impl, TRUE);
+      GtkMountOperation *mount_op;
 
+      set_busy_cursor (impl, TRUE);
+   
+      mount_op = gtk_mount_operation_new (get_toplevel (GTK_WIDGET (impl)));
       impl->shortcuts_activate_iter_cancellable =
-        _gtk_file_system_mount_volume (impl->file_system, volume, NULL,
+        _gtk_file_system_mount_volume (impl->file_system, volume, mount_op,
                                       shortcuts_activate_volume_mount_cb,
                                       g_object_ref (impl));
+      g_object_unref (mount_op);
     }
   else
     {